package com.farmUni.entity;

public class LuckyArticle implements Comparable<LuckyArticle>{
    public Long articleId;
    public int score;
    public LuckyArticle(Long articleId, int score) {
        this.articleId = articleId;
        this.score = score;
    }

    @Override
    public String toString() {
        return "Article{" +
                "articleId='" + articleId + '\'' +
                ", score=" + score +
                '}';
    }


    @Override
    public int compareTo(LuckyArticle o) {
        return score > o.score ? -1 : 1;
    }
}
